package com.su.producer.controller;

import com.atguigu.commonutils.R;
import com.su.producer.service.DirectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/service_mes/direct")
public class DirectController {

    @Autowired
    private DirectService directService;

    @GetMapping("sendmes")
    public R sendmes(@RequestParam("msg") String msg,@RequestParam("routingKey") String routingKey){
        directService.sendMessage(msg,routingKey);
        return R.ok();
    }


}
